package com.test.ddaidai.findpassword;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.test.ddaidai_android.activity.R;

public class FindPasswordFinish extends Fragment implements OnClickListener {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		FindPasswordActivity activity = (FindPasswordActivity) getActivity();
		activity.setTitle(getString(R.string.login_account_findloginpassword_finish_header_title),
				R.drawable.ic_back_normal,false, 0,true);
		View v = inflater.inflate(R.layout.fragment_findloginpassword_finish, null);
			Button findpassword_finish_sub_btn = (Button) v.findViewById(R.id.findpassword_finish_sub_btn);
			findpassword_finish_sub_btn.setOnClickListener(this);
		return v;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.findpassword_finish_sub_btn:
			FragmentManager fm = getActivity().getSupportFragmentManager();
			Fragment fragment = new FindPasswordFinish();
			FragmentTransaction tran = fm.beginTransaction();
			tran.replace(R.id.findpassword_fragment, fragment);
			tran.addToBackStack(null);
			tran.commit();
			break;
		default:
			break;
		}
	}
	
}
